package cn.kgc.tangcco.lifecycle;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/10/15 下午3:34
 */
public class ServletLifeCycle02 extends HttpServlet {
    private static final long serialVersionUID = 7860824258933449394L;

    public ServletLifeCycle02() {
        System.out.println("lifeCycle02");
    }

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("lifeCycle02爱的轰轰烈烈");
    }

    @Override
    public void destroy() {
        System.out.println("lifeCycle02挥一挥衣袖不带走一片云彩");
    }

    @Override
    public void init() throws ServletException {
        System.out.println("lifeCycle02轻轻的我来了");
    }
}
